{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "#导入需要的工具包\n",
    "import numpy as np#矩阵操作\n",
    "import pandas as pd#数据处理\n",
    "from sklearn.metrics import r2_score#评价回归预测模型的性能\n",
    "import matplotlib.pyplot as plt#画图\n",
    "import seaborn as sns\n",
    "\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>CRIM</th>\n",
       "      <th>ZN</th>\n",
       "      <th>INDUS</th>\n",
       "      <th>CHAS</th>\n",
       "      <th>NOX</th>\n",
       "      <th>RM</th>\n",
       "      <th>AGE</th>\n",
       "      <th>DIS</th>\n",
       "      <th>TAX</th>\n",
       "      <th>PTRATIO</th>\n",
       "      <th>...</th>\n",
       "      <th>RAD_2</th>\n",
       "      <th>RAD_3</th>\n",
       "      <th>RAD_4</th>\n",
       "      <th>RAD_5</th>\n",
       "      <th>RAD_6</th>\n",
       "      <th>RAD_7</th>\n",
       "      <th>RAD_8</th>\n",
       "      <th>RAD_24</th>\n",
       "      <th>MEDV</th>\n",
       "      <th>Log_MEDV</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-0.419782</td>\n",
       "      <td>0.285654</td>\n",
       "      <td>-1.287909</td>\n",
       "      <td>-0.272599</td>\n",
       "      <td>-0.144217</td>\n",
       "      <td>0.413672</td>\n",
       "      <td>-0.120013</td>\n",
       "      <td>0.140214</td>\n",
       "      <td>-0.666608</td>\n",
       "      <td>-1.353192</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.159686</td>\n",
       "      <td>0.345176</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>-0.417339</td>\n",
       "      <td>-0.487292</td>\n",
       "      <td>-0.593381</td>\n",
       "      <td>-0.272599</td>\n",
       "      <td>-0.740262</td>\n",
       "      <td>0.194274</td>\n",
       "      <td>0.367166</td>\n",
       "      <td>0.557160</td>\n",
       "      <td>-0.987329</td>\n",
       "      <td>-0.475352</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>-0.101524</td>\n",
       "      <td>0.084104</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>-0.417342</td>\n",
       "      <td>-0.487292</td>\n",
       "      <td>-0.593381</td>\n",
       "      <td>-0.272599</td>\n",
       "      <td>-0.740262</td>\n",
       "      <td>1.282714</td>\n",
       "      <td>-0.265812</td>\n",
       "      <td>0.557160</td>\n",
       "      <td>-0.987329</td>\n",
       "      <td>-0.475352</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.324247</td>\n",
       "      <td>1.266776</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-0.416750</td>\n",
       "      <td>-0.487292</td>\n",
       "      <td>-1.306878</td>\n",
       "      <td>-0.272599</td>\n",
       "      <td>-0.835284</td>\n",
       "      <td>1.016303</td>\n",
       "      <td>-0.809889</td>\n",
       "      <td>1.077737</td>\n",
       "      <td>-1.106115</td>\n",
       "      <td>-0.036432</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.182758</td>\n",
       "      <td>1.170822</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>-0.412482</td>\n",
       "      <td>-0.487292</td>\n",
       "      <td>-1.306878</td>\n",
       "      <td>-0.272599</td>\n",
       "      <td>-0.835284</td>\n",
       "      <td>1.228577</td>\n",
       "      <td>-0.511180</td>\n",
       "      <td>1.077737</td>\n",
       "      <td>-1.106115</td>\n",
       "      <td>-0.036432</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.487503</td>\n",
       "      <td>1.373242</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 23 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       CRIM        ZN     INDUS      CHAS       NOX        RM       AGE  \\\n",
       "0 -0.419782  0.285654 -1.287909 -0.272599 -0.144217  0.413672 -0.120013   \n",
       "1 -0.417339 -0.487292 -0.593381 -0.272599 -0.740262  0.194274  0.367166   \n",
       "2 -0.417342 -0.487292 -0.593381 -0.272599 -0.740262  1.282714 -0.265812   \n",
       "3 -0.416750 -0.487292 -1.306878 -0.272599 -0.835284  1.016303 -0.809889   \n",
       "4 -0.412482 -0.487292 -1.306878 -0.272599 -0.835284  1.228577 -0.511180   \n",
       "\n",
       "        DIS       TAX   PTRATIO  ...  RAD_2  RAD_3  RAD_4  RAD_5  RAD_6  \\\n",
       "0  0.140214 -0.666608 -1.353192  ...      0      0      0      0      0   \n",
       "1  0.557160 -0.987329 -0.475352  ...      1      0      0      0      0   \n",
       "2  0.557160 -0.987329 -0.475352  ...      1      0      0      0      0   \n",
       "3  1.077737 -1.106115 -0.036432  ...      0      1      0      0      0   \n",
       "4  1.077737 -1.106115 -0.036432  ...      0      1      0      0      0   \n",
       "\n",
       "   RAD_7  RAD_8  RAD_24      MEDV  Log_MEDV  \n",
       "0      0      0       0  0.159686  0.345176  \n",
       "1      0      0       0 -0.101524  0.084104  \n",
       "2      0      0       0  1.324247  1.266776  \n",
       "3      0      0       0  1.182758  1.170822  \n",
       "4      0      0       0  1.487503  1.373242  \n",
       "\n",
       "[5 rows x 23 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#读取数据\n",
    "df = pd.read_csv(\"./FE_boston_housing.csv\")\n",
    "df. head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 506 entries, 0 to 505\n",
      "Data columns (total 23 columns):\n",
      "CRIM        506 non-null float64\n",
      "ZN          506 non-null float64\n",
      "INDUS       506 non-null float64\n",
      "CHAS        506 non-null float64\n",
      "NOX         506 non-null float64\n",
      "RM          506 non-null float64\n",
      "AGE         506 non-null float64\n",
      "DIS         506 non-null float64\n",
      "TAX         506 non-null float64\n",
      "PTRATIO     506 non-null float64\n",
      "B           506 non-null float64\n",
      "LSTAT       506 non-null float64\n",
      "RAD_1       506 non-null int64\n",
      "RAD_2       506 non-null int64\n",
      "RAD_3       506 non-null int64\n",
      "RAD_4       506 non-null int64\n",
      "RAD_5       506 non-null int64\n",
      "RAD_6       506 non-null int64\n",
      "RAD_7       506 non-null int64\n",
      "RAD_8       506 non-null int64\n",
      "RAD_24      506 non-null int64\n",
      "MEDV        506 non-null float64\n",
      "Log_MEDV    506 non-null float64\n",
      "dtypes: float64(14), int64(9)\n",
      "memory usage: 91.0 KB\n"
     ]
    }
   ],
   "source": [
    "df.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(404, 21)"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#数据准备\n",
    "#从原始数据中分离出特征x和输出y\n",
    "y = df[\"MEDV\"]\n",
    "X = df.drop([\"MEDV\", \"Log_MEDV\"], axis=1)\n",
    "\n",
    "#特征名称，用于后续显示权重系数对应的特征\n",
    "feat_names = X.columns\n",
    "\n",
    "#将数据分割成训练数据和测试数据\n",
    "from sklearn.model_selection import train_test_split\n",
    "\n",
    "#随机采样20%的数据构建测试样本，剩下的为训练样本\n",
    "X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=30, test_size=0.2)\n",
    "X_train.shape"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 线性回归模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>columns</th>\n",
       "      <th>coef</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>RAD_24</td>\n",
       "      <td>0.452262</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>RAD_7</td>\n",
       "      <td>0.349686</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>RAD_8</td>\n",
       "      <td>0.270685</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>RM</td>\n",
       "      <td>0.267316</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>ZN</td>\n",
       "      <td>0.144948</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>RAD_3</td>\n",
       "      <td>0.087850</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>CHAS</td>\n",
       "      <td>0.079904</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>B</td>\n",
       "      <td>0.075170</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>INDUS</td>\n",
       "      <td>0.021732</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>AGE</td>\n",
       "      <td>0.020230</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>RAD_5</td>\n",
       "      <td>-0.095316</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>CRIM</td>\n",
       "      <td>-0.104573</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>RAD_4</td>\n",
       "      <td>-0.119312</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>TAX</td>\n",
       "      <td>-0.194907</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>NOX</td>\n",
       "      <td>-0.228508</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>PTRATIO</td>\n",
       "      <td>-0.234832</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>RAD_6</td>\n",
       "      <td>-0.252354</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>RAD_2</td>\n",
       "      <td>-0.293479</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>DIS</td>\n",
       "      <td>-0.392703</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>RAD_1</td>\n",
       "      <td>-0.400022</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>LSTAT</td>\n",
       "      <td>-0.439594</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    columns      coef\n",
       "20   RAD_24  0.452262\n",
       "18    RAD_7  0.349686\n",
       "19    RAD_8  0.270685\n",
       "5        RM  0.267316\n",
       "1        ZN  0.144948\n",
       "14    RAD_3  0.087850\n",
       "3      CHAS  0.079904\n",
       "10        B  0.075170\n",
       "2     INDUS  0.021732\n",
       "6       AGE  0.020230\n",
       "16    RAD_5 -0.095316\n",
       "0      CRIM -0.104573\n",
       "15    RAD_4 -0.119312\n",
       "8       TAX -0.194907\n",
       "4       NOX -0.228508\n",
       "9   PTRATIO -0.234832\n",
       "17    RAD_6 -0.252354\n",
       "13    RAD_2 -0.293479\n",
       "7       DIS -0.392703\n",
       "12    RAD_1 -0.400022\n",
       "11    LSTAT -0.439594"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.linear_model import LinearRegression\n",
    "\n",
    "#使用缺省参数初始化学习器\n",
    "lr = LinearRegression()\n",
    "\n",
    "#训练模型\n",
    "lr.fit(X_train, y_train)\n",
    "\n",
    "#用训练好的模型对测试集预测\n",
    "y_test_pred_lr = lr.predict(X_test)\n",
    "y_train_pred_lr = lr.predict(X_train)\n",
    "\n",
    "#查看各特征的权值系数，系数的绝对值大小可视为该特征的重要性\n",
    "fs = pd.DataFrame({\"columns\":list(feat_names),\"coef\":list(lr.coef_)})#注意大括号，表字典\n",
    "fs.sort_values(by=[\"coef\"],ascending=False)#ascending参数控制升序还是降序"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 线性回归模型评价"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The R2 score of LinearRegression on test is  0.6913834670055632\n",
      "The R2 score of LinearRegression on train is  0.753908437986617\n"
     ]
    }
   ],
   "source": [
    "#测试集R2得分\n",
    "print(\"The R2 score of LinearRegression on test is \", r2_score(y_test, y_test_pred_lr))\n",
    "#训练集R2得分\n",
    "print(\"The R2 score of LinearRegression on train is \", r2_score(y_train, y_train_pred_lr))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.legend.Legend at 0x21d27f5d9b0>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAeMAAAF1CAYAAADbSIJmAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAGfhJREFUeJzt3X+8VXWd7/HXRziJI4qpoAgVamr+BOxIcE2lqLRBxbk3s64/8CFqD9Oy7vTLvI0np2bqYddu3mF6DDdLu1qiTg7emu7YZWRIr6NxjLGUCsZkAgmOFAKWCcfP/WMvmCOcw9mcX1/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ERHHTQQf0602EYS1IBBnFj6e/7aRhLUhMaNmwYkyZN4oQTTuCcc85hw4YNfdrO5ZdfzlNPPbXT/Ntuu41rrrmmz/WNHDmy7rbTp0/f6R4WS5Ys4cMf/nCf9z/UvGYsSYW1tQ399vbZZx+WLl0KwOzZs5k7dy7XX3/9bu/ra1/72m6vMxRaW1tpbW0d1H10dnYybNiwAdmWPWNJanLTpk1j9erV26dvuukmTjnlFE466SRuuOEGAF544QVmzpzJxIkTOeGEE5g/fz7wyl7pN77xDY4++mjOOOMMHn744e3bu/TSS7n33nu3T2/r9W7evJkZM2Zw8sknc+KJJ7JgwYKdaluzZg2nn3769l78D3/4w7pe06JFizj77LMBaGtr47LLLmP69OkcccQR3HLLLdvb3XHHHUyZMoVJkybxgQ98gM7OTgCuuuoqWltbOf7447cfA6jdSfLGG2/krW99K/fcc09dtdTDnrEkNbHOzk4WLlzInDlzAHjggQdYvnw5jz32GJnJueeey+LFi+no6OCwww7je9/7HgDPP//8K7azZs0abrjhBtrb2xk1ahRve9vbmDx58i73PWLECO677z72339/nnvuOaZOncq55577iuuv3/rWtzjzzDO5/vrr6ezs5He/+12fXufPfvYzHnzwQTZt2sQxxxzDVVddxYoVK5g/fz4PP/wwLS0tfPCDH+TOO+/kkksu4fOf/zwHHnggnZ2dzJgxgyeeeIKTTjppe90PPfRQn+roiWEsSU3o97//PZMmTeKZZ57hzW9+M+985zuBWhg/8MAD24N08+bNLF++nNNOO42PfexjfPKTn+Tss8/mtNNOe8X2Hn30UaZPn87o0bXvRLjgggv4xS9+scsaMpNPf/rTLF68mL322ovVq1ezdu1aDj300O1tTjnlFC677DK2bNnCeeedx6RJk/r0emfOnMnee+/N3nvvzZgxY1i7di0LFy6kvb2dU045ZfsxGTNmDAB333038+bNY+vWraxZs4annnpqexhfcMEFfaphVzxNLUlNaNs145UrV/LSSy8xd+5coBaQ1113HUuXLmXp0qWsWLGCOXPmcPTRR9Pe3s6JJ57Iddddx4033rjTNnsaUTx8+HBefvnl7d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[
       "<Figure size 576x432 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#在训练集上观察预测残差的直方图分布，看是否符合模型假设：噪声为0均值的高斯噪声\n",
    "f, ax = plt.subplots(figsize=(8,6))\n",
    "ax.hist(y_train - y_train_pred_lr, bins=40, label=\"Residuals Linear\", color=\"b\", alpha=0.5)#这里alpha参数表示直方格颜色的深浅\n",
    "ax.set_title(\"Histogram of Residuals\")\n",
    "ax.legend(loc=\"best\")#显示图标"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjgAAAGoCAYAAABL+58oAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzs3Xl4U1X6B/DvSZq2KVBaFgWqLCqCIkulCIozjEWFEZeKKJv8FBB03AYVFJURcANFBhWXGTdcYBABLSAgLiAKitJaKiKoCIiUrViK0IWmzfn9UVLS9N6be7Pdm/T7eR6fkTS5OSlO79tz3kVIKUFEREQUS2xmL4CIiIgo1BjgEBERUcxhgENEREQxhwEOERERxRwGOERERBRzGOAQERFRzGGAQ0RERDGHAQ4RERHFHAY4REREFHPizF6AEc2aNZNt27Y1exlERERkktzc3ENSyub+nhdVAU7btm2Rk5Nj9jKIiIjIJEKI3/Q8j0dUREREFHMY4BAREVHMYYBDREREMYcBDhEREcUcBjhEREQUcxjgEBERUcxhgENEREQxhwEOERERxRwGOERERBRzGOAQERFRzGGAQ0RERDGHAQ4RERHFHNMCHCFEohDiWyFEvhBiixBiqllrISIiothi5jTx4wAypZTHhBAOAOuEECullBtMXBMRERHFANMCHCmlBHDsxB8dJ/6RZq2HiIiIYoepOThCCLsQYh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hiCQOceujtt9/G7bffjoSEBMyZM8f0jsRkPvYOIqJYwyTjeuTYsWMYMWIEbrrpJmRkZCA/Px9XX3212csiC9DqHUREFI0Y4NQjNpsN33//PR599FF89tlnOO2008xeElkEewcRUazhEVWMc7vdePXVVzF8+HA0bNgQGzduRHx8vNnLIotpleJEgUIww95BRBStuIMTww4cOIABAwbgtttuw5tvvgkADG5IEXsHEVGs4Q5OjPrkk08wYsQIFBcX46WXXsJtt3GWKalj7yAiijUMcGLQq6++irFjx+Lcc8/FJ598gs6dO5u9JIoCWelpDGiIKGbwiCoGXXbZZbj77ruxceNGBjdERFQvMcCJEQsWLMCNN94IKSXatm2L5557DklJSWYvi4iIyBQMcKJcSUkJbrnlFgwZMgQ7duzAkSNHzF4SERGR6RjgRLH8/HxkZGTgjTfewEMPPYS1a9ciJSXF7GURERGZjknGUaqyshLXXnstysvL8emnnyIzM9PsJREREVkGA5woU1RUhOTkZMTFxeG9995DmzZt0Lx5c7OXRUREZCk8oooia9euRZcuXfDoo48CADIyMhjcEBERKWCAEwUqKysxefJkZGZmIikpCVlZWWYviYiIyNJ4RGVxv//+O4YNG4Z169bhpptuwgsvvICGDRuavSwiIiJLY4BjcQcPHsTWrVsxd+5cDB8+3OzlEBERRQUGOBZUVlaGpUuXYvDgwejevTt27drFXRsiIiIDmINjMVu2bMEFF1yAIUOG4IcffgAABjdEREQGMcCxCCklXnnlFfTo0QMHDhzAypUrcd5555m9LCIioqjEAMciRo8ejVtvvRW9e/fG999/j/79+5u9JCIioqjFHByLyMzMRIcOHTBhwgTYbIw7iYiIgsEAxyRVVVV46qmn0KJFC4waNQo33nij2UsiIiKKGdwqMMHevXtx+eWX4+GHH8b69evNXg4REVHMYYATYcuXL0fXrl2xYcMGvP7663jttdfMXhIR/X979x9bVXnHcfz9kRUKMgJDMgWBLUIQo1BcQ8hGlsFYMTp/jiUsCxsQp0QX9A8Mcy64QUw2WMiymcgWFFnUsqngFtxWgW06FxlUrehESDeDggu6KT/KMPzod3/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": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#或观察预测值和真实值的散点图\n",
    "plt.figure(figsize=(8,6))\n",
    "plt.scatter(y_train, y_train_pred_lr)\n",
    "plt.plot([-3,3],[-3,3],\"--k\")#画出y=x的虚线用于比较，数据已经标准化，只观察3倍标准差内的即可\n",
    "plt.axis(\"tight\")\n",
    "plt.xlabel(\"True price\")\n",
    "plt.ylabel(\"Predict price\")\n",
    "plt.tight_layout()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 加正则项的线性回归模型"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "1、带L2正则项的岭回归"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The R2 score of Ridge Regression on test is  0.6974438660354578\n",
      "The R2 score of Ridge Regression on train is  0.7537497752485548\n"
     ]
    }
   ],
   "source": [
    "#参数调优后训练模型并评价模型\n",
    "from sklearn.linear_model import RidgeCV\n",
    "\n",
    "#设置超参数的调优范围\n",
    "alphas = [0.01, 0.1, 1, 10, 100]\n",
    "\n",
    "#初始化学习器\n",
    "ridge = RidgeCV(alphas=alphas,store_cv_values=True)\n",
    "\n",
    "#训练模型\n",
    "ridge.fit(X_train, y_train)\n",
    "\n",
    "#在校验集和训练集上预测\n",
    "y_train_pred_ridge = ridge.predict(X_train)\n",
    "y_test_pred_ridge = ridge.predict(X_test)\n",
    "\n",
    "#用R2分数评价模型在训练集和测试集上的性能\n",
    "print(\"The R2 score of Ridge Regression on test is \", r2_score(y_test, y_test_pred_ridge))\n",
    "print(\"The R2 score of Ridge Regression on train is \", r2_score(y_train, y_train_pred_ridge))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAEKCAYAAAA4t9PUAAAABH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PsXgWO8FXZXkhk9RMsgpiARgWeI95y6FfgN8PfBoayniO9hbAf+g/iocycBzOzTZtZAfI/jZTP7drCsZ4G9xHvx/Rbxsdhx97PAHjO7Imj3r8AKM1tP/Mv8bDe1vQCsJt6j61PuXp1iXb4Q1PlL4LWE6V8NLiTYTjw4twbT3wP8LMUyRXqk3n9FemBmIz0+4t044nspNwUhcynL+jBwnbs/kmb7TxLv7nvlpXxeGssvJH4+6O0eH95X5JIMyRESRXrhp2ZWTPwcxj9eaogAuPszCecmMkE58LBCRPpKeyQiItInOkciIiJ9oiAREZE+UZCIiEifKEhERKRPFCQiItInChIREemT/w91chqplZ8qNgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "alpha is  1.0\n"
     ]
    }
   ],
   "source": [
    "#可视化岭回归模型性能\n",
    "mes = np.mean(ridge.cv_values_, axis=0)#均方误差，注意当store_cv_values为真时，RigdeCV才返回cv_values_的值\n",
    "plt.plot(np.log10(alphas), mes.reshape(len(alphas),1))#画折线图\n",
    "plt.xlabel(\"log10(alphas)\")\n",
    "plt.ylabel(\"mes\")\n",
    "#plt.plot(np.log10(ridge.alpha_)*np.ones(3), [0.29, 0.30, 0.31])#标出最优参数的位置，非必须\n",
    "plt.show()\n",
    "\n",
    "print(\"alpha is \", ridge.alpha_)#打印调优后的正则参数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>columns</th>\n",
       "      <th>coef_lr</th>\n",
       "      <th>coef_ridge</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>RAD_24</td>\n",
       "      <td>0.452262</td>\n",
       "      <td>0.405066</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>RAD_7</td>\n",
       "      <td>0.349686</td>\n",
       "      <td>0.313040</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>RAD_8</td>\n",
       "      <td>0.270685</td>\n",
       "      <td>0.256947</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>RM</td>\n",
       "      <td>0.267316</td>\n",
       "      <td>0.271496</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>ZN</td>\n",
       "      <td>0.144948</td>\n",
       "      <td>0.139474</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>RAD_3</td>\n",
       "      <td>0.087850</td>\n",
       "      <td>0.096199</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>CHAS</td>\n",
       "      <td>0.079904</td>\n",
       "      <td>0.081505</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>B</td>\n",
       "      <td>0.075170</td>\n",
       "      <td>0.074754</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>INDUS</td>\n",
       "      <td>0.021732</td>\n",
       "      <td>0.015328</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>AGE</td>\n",
       "      <td>0.020230</td>\n",
       "      <td>0.016699</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>RAD_5</td>\n",
       "      <td>-0.095316</td>\n",
       "      <td>-0.087928</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>CRIM</td>\n",
       "      <td>-0.104573</td>\n",
       "      <td>-0.101393</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>RAD_4</td>\n",
       "      <td>-0.119312</td>\n",
       "      <td>-0.113578</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>TAX</td>\n",
       "      <td>-0.194907</td>\n",
       "      <td>-0.173019</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>NOX</td>\n",
       "      <td>-0.228508</td>\n",
       "      <td>-0.220767</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>PTRATIO</td>\n",
       "      <td>-0.234832</td>\n",
       "      <td>-0.230566</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>RAD_6</td>\n",
       "      <td>-0.252354</td>\n",
       "      <td>-0.241099</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>RAD_2</td>\n",
       "      <td>-0.293479</td>\n",
       "      <td>-0.260770</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>DIS</td>\n",
       "      <td>-0.392703</td>\n",
       "      <td>-0.385246</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>RAD_1</td>\n",
       "      <td>-0.400022</td>\n",
       "      <td>-0.367878</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>LSTAT</td>\n",
       "      <td>-0.439594</td>\n",
       "      <td>-0.437211</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    columns   coef_lr  coef_ridge\n",
       "20   RAD_24  0.452262    0.405066\n",
       "18    RAD_7  0.349686    0.313040\n",
       "19    RAD_8  0.270685    0.256947\n",
       "5        RM  0.267316    0.271496\n",
       "1        ZN  0.144948    0.139474\n",
       "14    RAD_3  0.087850    0.096199\n",
       "3      CHAS  0.079904    0.081505\n",
       "10        B  0.075170    0.074754\n",
       "2     INDUS  0.021732    0.015328\n",
       "6       AGE  0.020230    0.016699\n",
       "16    RAD_5 -0.095316   -0.087928\n",
       "0      CRIM -0.104573   -0.101393\n",
       "15    RAD_4 -0.119312   -0.113578\n",
       "8       TAX -0.194907   -0.173019\n",
       "4       NOX -0.228508   -0.220767\n",
       "9   PTRATIO -0.234832   -0.230566\n",
       "17    RAD_6 -0.252354   -0.241099\n",
       "13    RAD_2 -0.293479   -0.260770\n",
       "7       DIS -0.392703   -0.385246\n",
       "12    RAD_1 -0.400022   -0.367878\n",
       "11    LSTAT -0.439594   -0.437211"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#查看各特征的权值系数，系数的绝对值大小可视为该特征的重要性\n",
    "fs = pd.DataFrame({\"columns\":list(feat_names), \"coef_lr\":list(lr.coef_), \"coef_ridge\":list(ridge.coef_)})\n",
    "fs.sort_values(by=[\"coef_lr\"],ascending=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "2、带L1正则项的Lasso"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The R2 score of Linear Lasso on test is  0.6977915249872964\n",
      "The R2 score of Linear Lasso on train is  0.7537250176099197\n"
     ]
    }
   ],
   "source": [
    "from sklearn.linear_model import LassoCV\n",
    "\n",
    "lasso = LassoCV(cv=3)\n",
    "lasso.fit(X_train, y_train)\n",
    "\n",
    "y_train_pred_lasso = lasso.predict(X_train)\n",
    "y_test_pred_lasso = lasso.predict(X_test)\n",
    "\n",
    "print(\"The R2 score of Linear Lasso on test is \", r2_score(y_test, y_test_pred_lasso))\n",
    "print(\"The R2 score of Linear Lasso on train is \", r2_score(y_train, y_train_pred_lasso))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>columns</th>\n",
       "      <th>coef_lr</th>\n",
       "      <th>coef_ridge</th>\n",
       "      <th>coef_lasso</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>RAD_24</td>\n",
       "      <td>0.452262</td>\n",
       "      <td>0.405066</td>\n",
       "      <td>0.498189</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>RAD_7</td>\n",
       "      <td>0.349686</td>\n",
       "      <td>0.313040</td>\n",
       "      <td>0.402894</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>RAD_8</td>\n",
       "      <td>0.270685</td>\n",
       "      <td>0.256947</td>\n",
       "      <td>0.341884</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>RM</td>\n",
       "      <td>0.267316</td>\n",
       "      <td>0.271496</td>\n",
       "      <td>0.271278</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>ZN</td>\n",
       "      <td>0.144948</td>\n",
       "      <td>0.139474</td>\n",
       "      <td>0.137449</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>RAD_3</td>\n",
       "      <td>0.087850</td>\n",
       "      <td>0.096199</td>\n",
       "      <td>0.178505</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>CHAS</td>\n",
       "      <td>0.079904</td>\n",
       "      <td>0.081505</td>\n",
       "      <td>0.081310</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>B</td>\n",
       "      <td>0.075170</td>\n",
       "      <td>0.074754</td>\n",
       "      <td>0.074210</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>INDUS</td>\n",
       "      <td>0.021732</td>\n",
       "      <td>0.015328</td>\n",
       "      <td>0.010487</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>AGE</td>\n",
       "      <td>0.020230</td>\n",
       "      <td>0.016699</td>\n",
       "      <td>0.014471</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>RAD_5</td>\n",
       "      <td>-0.095316</td>\n",
       "      <td>-0.087928</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>CRIM</td>\n",
       "      <td>-0.104573</td>\n",
       "      <td>-0.101393</td>\n",
       "      <td>-0.101115</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>RAD_4</td>\n",
       "      <td>-0.119312</td>\n",
       "      <td>-0.113578</td>\n",
       "      <td>-0.019184</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>TAX</td>\n",
       "      <td>-0.194907</td>\n",
       "      <td>-0.173019</td>\n",
       "      <td>-0.172267</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>NOX</td>\n",
       "      <td>-0.228508</td>\n",
       "      <td>-0.220767</td>\n",
       "      <td>-0.218297</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>PTRATIO</td>\n",
       "      <td>-0.234832</td>\n",
       "      <td>-0.230566</td>\n",
       "      <td>-0.231242</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>RAD_6</td>\n",
       "      <td>-0.252354</td>\n",
       "      <td>-0.241099</td>\n",
       "      <td>-0.149135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>RAD_2</td>\n",
       "      <td>-0.293479</td>\n",
       "      <td>-0.260770</td>\n",
       "      <td>-0.165896</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>DIS</td>\n",
       "      <td>-0.392703</td>\n",
       "      <td>-0.385246</td>\n",
       "      <td>-0.386243</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>RAD_1</td>\n",
       "      <td>-0.400022</td>\n",
       "      <td>-0.367878</td>\n",
       "      <td>-0.281562</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>LSTAT</td>\n",
       "      <td>-0.439594</td>\n",
       "      <td>-0.437211</td>\n",
       "      <td>-0.437950</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    columns   coef_lr  coef_ridge  coef_lasso\n",
       "20   RAD_24  0.452262    0.405066    0.498189\n",
       "18    RAD_7  0.349686    0.313040    0.402894\n",
       "19    RAD_8  0.270685    0.256947    0.341884\n",
       "5        RM  0.267316    0.271496    0.271278\n",
       "1        ZN  0.144948    0.139474    0.137449\n",
       "14    RAD_3  0.087850    0.096199    0.178505\n",
       "3      CHAS  0.079904    0.081505    0.081310\n",
       "10        B  0.075170    0.074754    0.074210\n",
       "2     INDUS  0.021732    0.015328    0.010487\n",
       "6       AGE  0.020230    0.016699    0.014471\n",
       "16    RAD_5 -0.095316   -0.087928    0.000000\n",
       "0      CRIM -0.104573   -0.101393   -0.101115\n",
       "15    RAD_4 -0.119312   -0.113578   -0.019184\n",
       "8       TAX -0.194907   -0.173019   -0.172267\n",
       "4       NOX -0.228508   -0.220767   -0.218297\n",
       "9   PTRATIO -0.234832   -0.230566   -0.231242\n",
       "17    RAD_6 -0.252354   -0.241099   -0.149135\n",
       "13    RAD_2 -0.293479   -0.260770   -0.165896\n",
       "7       DIS -0.392703   -0.385246   -0.386243\n",
       "12    RAD_1 -0.400022   -0.367878   -0.281562\n",
       "11    LSTAT -0.439594   -0.437211   -0.437950"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#对比各个模型的特征的权值系数\n",
    "fs = pd.DataFrame({\"columns\":list(feat_names), \"coef_lr\":list(lr.coef_), \"coef_ridge\":list(ridge.coef_), \"coef_lasso\":list(lasso.coef_)})\n",
    "fs.sort_values(by=[\"coef_lr\"],ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEKCAYAAAAW8vJGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xl4VPd97/H3VztaQAKJxYjNBuMdjGWy2Emcxnawm5rYWbz0NraTht4kbvo0TVvc9Dp9nKRbmqY3rZOU5PpmaWvXsZ2EJiReYrvEviZGYDAGDAixSCCQQBuS0Drf+8cc4ZGQ0IB1dGakz+t55pk5Z35z5ns0MJ8553fO75i7IyIi0i8j6gJERCS1KBhERGQABYOIiAygYBARkQEUDCIiMoCCQUREBlAwiIjIAAoGEREZQMEgIiIDZEVdwNkqLS31+fPnR12GiEha2bRp0zF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MY+CU7nLXAx4J+i7cDLR6/qMtu3vxVD/EhjeuCrZHfI37pxaHcYPFrDU8ifsWwl0Z4/yKgzsyyie+CSnQh6TsCq6QgBYOMZz8mPlLuVuA54M/c/QjxUXRriX+Z/ivwG+JXtcLMPmtmtcS3CF4zs+8Gy1pH/PreVcSPQPo0gLu3A3vNbGHQ7pvA3Wa2gfgXdvswtb0I/JD4aLFPuHvlCOvyv4I6n+H04eCvAZ4d4fUiSdPoqjIhmVmhu7eZ2TTiWxHXBKFxLsu6FbjK3f8yyfb3ABXuft+5vN+gZV0JfM7df++tLkukn/oYZKL6mZkVAznAl841FADc/cdBwEShlPjWhMio0RaDiIgMoD4GEREZQMEgIiIDKBhERGQABYOIiAygYBARkQEUDCIiMsD/B6IwuJPuVGswAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "alphas are  [0.76113143 0.70983372 0.66199331 0.61737717 0.57576802 0.53696318\n",
      " 0.50077366 0.46702319 0.43554739 0.40619295 0.37881691 0.35328592\n",
      " 0.32947563 0.30727007 0.2865611  0.26724784 0.24923623 0.23243854\n",
      " 0.21677296 0.20216319 0.18853807 0.17583123 0.1639808  0.15292904\n",
      " 0.14262213 0.13300988 0.12404546 0.11568521 0.10788841 0.1006171\n",
      " 0.09383584 0.08751162 0.08161363 0.07611314 0.07098337 0.06619933\n",
      " 0.06173772 0.0575768  0.05369632 0.05007737 0.04670232 0.04355474\n",
      " 0.0406193  0.03788169 0.03532859 0.03294756 0.03072701 0.02865611\n",
      " 0.02672478 0.02492362 0.02324385 0.0216773  0.02021632 0.01885381\n",
      " 0.01758312 0.01639808 0.0152929  0.01426221 0.01330099 0.01240455\n",
      " 0.01156852 0.01078884 0.01006171 0.00938358 0.00875116 0.00816136\n",
      " 0.00761131 0.00709834 0.00661993 0.00617377 0.00575768 0.00536963\n",
      " 0.00500774 0.00467023 0.00435547 0.00406193 0.00378817 0.00353286\n",
      " 0.00329476 0.0030727  0.00286561 0.00267248 0.00249236 0.00232439\n",
      " 0.00216773 0.00202163 0.00188538 0.00175831 0.00163981 0.00152929\n",
      " 0.00142622 0.0013301  0.00124045 0.00115685 0.00107888 0.00100617\n",
      " 0.00093836 0.00087512 0.00081614 0.00076113]\n"
     ]
    }
   ],
   "source": [
    "#可视化模型性能\n",
    "mses = np.mean(lasso.mse_path_, axis=1)\n",
    "plt.plot(np.log10(lasso.alphas_), mses)\n",
    "plt.xlabel(\"log10(alpha)\")\n",
    "plt.ylabel(\"mse\")\n",
    "plt.show()\n",
    "\n",
    "print(\"alphas are \", lasso.alphas_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
